<p>Nested <code>switch</code> structures are difficult to understand because you can easily confuse the cases of an inner <code>switch</code> as
belonging to an outer statement or expression. Therefore nested <code>switch</code> statements and expressions should be avoided.</p>
<p>Specifically, you should structure your code to avoid the need for nested <code>switch</code> statements or expressions, but if you cannot, then
consider moving the inner <code>switch</code> to another method.</p>
<h2>Noncompliant Code Example</h2>
<pre>
void foo(int n, int m) {
  switch (n) {
    case 0:
      switch (m) {  // Noncompliant; nested switch
        // ...
      }
    case 1:
      // ...
    default:
      // ...
  }
}
</pre>
<h2>Compliant Solution</h2>
<pre>
void foo(int n, int m) {
  switch (n) {
    case 0:
      bar(m);
    case 1:
      // ...
    default:
      // ...
  }
}

void bar(int m){
  switch(m) {
    // ...
  }
}
</pre>

